﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>


<div class="dotpanel" style="margin: 20px auto 20px auto; padding: 20px; width:800px; height:130px; background: url(/Content/Images/panel/lightbox/panel.png);">
    LIGHTBOXES CỦA BẠN <br />
        <table>
            <tr>
                <td>
                    Bạn đang xem Lightbox
                </td>
                <td>
                    <select id="cmbLightboxList" name="cmbLightboxList">
<% 
    int count = 0;
    int currentLightboxID = 0;
    VietImage.Models.Lightbox currentLightbox = null;
    if(ViewData["Lightbox"] != null){
        currentLightbox = (VietImage.Models.Lightbox)ViewData["Lightbox"];
        currentLightboxID = currentLightbox.ID;
    }
    List<VietImage.Models.Lightbox> myLightboxes = (List<VietImage.Models.Lightbox>)ViewData["LightboxList"];
    if (myLightboxes != null)
    {
        foreach (VietImage.Models.Lightbox lb in myLightboxes)
        {
%>
                        <option value="<%= lb.ID %>" <%= (lb.ID == currentLightboxID)?"selected":"" %>><%= lb.Name%></option>
<% 
        }
    }
%>
                    </select>
                </td>
            </tr>
<% 
    if (currentLightbox != null)
    {    
%>
            <tr>
                <td>
                    Ngày khởi tạo
                </td>
                <td>
                    <%= currentLightbox.CreatedTime.ToString("dd / MM / yyyy") %>
                </td>
            </tr>
<%
    } 
%>
        </table>
        <br />CÁC TÙY CHỌN
        <table id="lightboxmanageroption">
            <tr>
                <td><a id="renamelightbox"><span>Đổi tên</span></a></td>
                <td><a id="deletelightbox"><span>Xóa</span></a></td>
                <td><a id="createlightbox"><span>Tạo Lightbox mới</span></a></td>
                <td><a id="downloadlightbox"><span>Tải Lightbox (PDF)</span></a></td>
                <td><a id="emaillightbox"><span>Email Lightbox</span></a></td>
            </tr>
        </table>
        <div id="frmlbn" style="display: none;">        
        
        <form id="lightboxname" name="lightboxname">
<div style="float: left;">
Tên lightbox 
<input type="text" id="lbname" name="lbname" value="" />
<input type="hidden" id="type" name="type" value="" />
<input type="submit" value="Thêm vào" style="display:none;" />
 </div>
                    <div class="button" style="cursor:pointer; float: left;" onmouseout="buttonmouseout('lightboxname');" onmousedown="buttonmousedown('lightboxname');" onmouseover="buttonmouseover('lightboxname');"><table cellpadding="0" cellspacing="0" border="0">
                        <tr>
                            <td id="lbtnlightboxname" class="left-button"></td>
                            <td id="mbtnlightboxname" class="middle-button"><span style="color:White;"></span></td>
                            <td id="rbtnlightboxname" class="right-button"></td>                        
                        </tr>          
                    </table></div>                    
                    <div id="closelbn" class="exitbutton" style="float: left; margin: 5px;"></div>
                    <div style="clear: both;"></div>
        </form>
        </div>

    </div>

